

import java.util.ArrayList;
import Server.Proxy;
import fit.ActionFixture;

public class CheckLend extends ActionFixture {
	
	
	
	String userID;
	String itemCopyID;
	Proxy func;
	
	public void connection() {
		func = new Proxy("jdbc:mysql://localhost/obl2", "root","");
	}

	public void itemIDcopy(String id) {
		itemCopyID=id;
	}
	public void userID(String id) {
		userID=id;
	}
	
	
	public String addLend() {
		ArrayList<String> result = new ArrayList<String>();
		ArrayList<String> ref = new ArrayList<String>();
		ref.add("add_memberlend");
		ref.add(itemCopyID);
		ref.add(userID);
		result=func.add_memberlend(ref);
		return result.get(0);
	}
	public String checkItemLend() {
		ArrayList<String> result = new ArrayList<String>();
		ArrayList<String> ref = new ArrayList<String>();
		ref.add("checkItemLend");
		ref.add(itemCopyID);
		ref.add(userID);
		result=func.checkItemLend(ref);
		return result.get(0);

	}
	
	
	
	

}

